<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">

<ui:composition template="/templates/tmpl_game.xhtml">
	<ui:define name="centro">

		<h:form id="form">

			<p:outputLabel
				value="As ações de lazer recuperam sua a energia. Porém terá que despender de alguns scrums para isso!!!" />
			<hr />
			<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
			<p:dataGrid var="item" value="#{lazerMBean.itens}" columns="3">

				<p:panel header="#{item.titulo}" style="text-align:center">
					<h:panelGrid columns="1" style="width:100%">
						<p:graphicImage value="/temp/acao#{item.id}.jpg" width="60px" height="60px" />
						<h:panelGrid columns="2" style="width:100%">

							<p:outputLabel value="Scrums compra:" />
							<p:outputLabel value="#{item.scrumsCompra}" />

							<p:outputLabel value="Ganho de Energia:" />
							<p:outputLabel value="#{item.ganhoEnergia}" />

						</h:panelGrid>
						<p:commandLink title="Comprar" action="#{lazerMBean.comprar}" update=":formPerfil">
							<h:outputText styleClass="ui-icon ui-icon-cart" />
							<f:setPropertyActionListener target="#{lazerMBean.itemSelecionado}" value="#{item}" />
						</p:commandLink>
					</h:panelGrid>
				</p:panel>

			</p:dataGrid>

		</h:form>

	</ui:define>
</ui:composition>

</html>
